﻿using System;
using System.ComponentModel.DataAnnotations;
using sharp_net.Domain;
using sharp_net.Repositories;
using zkdao.Enum;

namespace zkdao.Domain {

    public class RebateReply : DomainInt, IAggregateRoot {

        public Guid PosterID { get; set; }
        public Guid RebateID { get; set; }
        public string ContentRich { get; set; } //受限制的Rich，参考知呼

        public int PlusAmount { get; set; }
        public int MinusAmount { get; set; }
        public int Grade { get; set; }

        public string ParentIDs { get; set; } //将父类id都集中在这里，用符号隔开：1,3,6

        public void Update(RebateReplyData data) {
            if (!string.IsNullOrEmpty(data.ContentRich))
                this.ContentRich = data.ContentRich;
            if (data.ActEnum != 0)
                this.ActEnum = data.ActEnum;
        }
    }

    public class RebateReplyData : DomainIntData {

        public string Poster { get; set; }
        public string InfoID { get; set; }
        public string ContentRich { get; set; }

        public int PlusAmount { get; set; }
        public int MinusAmount { get; set; }
        public int Grade { get; set; }

        public string ParentIDs { get; set; }
    }
}